//
//  ShareHandle.m
//  Project_A
//
//  Created by running on my way on 15/1/20.
//  Copyright (c) 2015年 Flowers. All rights reserved.
//

#import "ShareHandle.h"

@implementation ShareHandle

//单例播放器
+ (AVPlayer *)avPlayer
{
    static AVPlayer *avplayer = nil;
    
    static dispatch_once_t onceToken;
    
        dispatch_once(&onceToken,^{
    
     avplayer = [[AVPlayer alloc] init];
    
        });

    return avplayer;
}

+ (AVAudioPlayer *)Player
{
    static AVAudioPlayer *player = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken,^{
        player = [[AVAudioPlayer alloc] init];
        
    });
    
    return player;
}

//- (void)playWithURL:(NSURL *)url
//{
//    AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url];
//}

@end
